package E3;

public class StringBufferDemo {
    public static void main(String[] args) {
        StringBuffer buffer = new StringBuffer();
        buffer.append("S");
        buffer.append("tringBuffer");
        StringBuffer s=new StringBuffer();
        s.append("StringBuffer");
        String a,b;
        a=s.toString();
        b=buffer.toString();
        System.out.println(a.equals(b));
        System.out.println(buffer.charAt(1));
        System.out.println(buffer.capacity());
        System.out.println(buffer.indexOf("tring"));
        System.out.println("buffer = " + buffer.toString());
    }
}